﻿using ProjScan.ScanRule.Attr;
using UnityEditor;
using UnityEngine;

namespace ProjScan.ScanRule.EditorSettings
{
    [GlobalEditorSettingRuleAttr]
    internal class Quality_GlobalAnisoFilter : GlobalEditorSettingRule
    {
        public override void Run()
        {
            if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android || EditorUserBuildSettings.activeBuildTarget == BuildTarget.iOS)
            {
                result = (QualitySettings.anisotropicFiltering != AnisotropicFiltering.ForceEnable);
            }
            else
            {
                result = true;
            }
        }
    }
}